using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Resources;
using System.Globalization;
using NBusiness.Properties;

namespace NBusiness.Utilities
{
    public class ResourceDescriptionAttribute : DescriptionAttribute
    {
        private ResourceManager _manager = new ResourceManager("NBusiness.Properties.Resources", typeof(ResourceDescriptionAttribute).Assembly);
        private string _resourceName;

        public override string Description
        {
            get
            {
                return _manager.GetString(_resourceName, CultureInfo.CurrentCulture);
            }
        }

        public ResourceDescriptionAttribute(string resourceName)
        {
            _resourceName = resourceName;
        }
    }
}
